// Thud - a dynamic object-oriented language
// Copyright (C) 2009,2010 David H. Hovemeyer <david.hovemeyer@gmail.com>

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

/*
 * ConstantType.h
 *
 *  Created on: Dec 1, 2009
 *      Author: dhovemey
 */

#ifndef CONSTANTTYPE_H_
#define CONSTANTTYPE_H_

#include <cstdint>

/**
 * Types of Constants.
 */
enum ConstantType {
	/** Signed 32-bit integer constant. */
	CONSTANT_I32,
	/** String constant. */
	CONSTANT_STRING,
	/** Symbol constant. */
	CONSTANT_SYMBOL,
	/** Class reference constant. */
	CONSTANT_CLASS,
	/** Boolean constant. */
	CONSTANT_BOOLEAN,
	/** Character constant. */
	CONSTANT_CHARACTER,
};

/** Tag for ConstantInt32 in serialized bytecode. */
const uint8_t CONSTANT_I32_TAG = uint8_t('I');
/** Tag for ConstantString in serialized bytecode. */
const uint8_t CONSTANT_STRING_TAG = uint8_t('S');
/** Tag for ConstantSymbol in serialized bytecode. */
const uint8_t CONSTANT_SYMBOL_TAG = uint8_t('Y');
/** Tag for ConstantClass in serialized bytecode. */
const uint8_t CONSTANT_CLASS_TAG = uint8_t('C');
/** Tag for ConstantBoolean in serialized bytecode. */
const uint8_t CONSTANT_BOOLEAN_TAG = uint8_t('B');
/** Tag for ConstantCharacter in serialized bytecode. */
const uint8_t CONSTANT_CHARACTER_TAG = uint8_t('R');

#endif /* CONSTANTTYPE_H_ */
